<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>组成员管理</title>
    <?php include(APPLICATION_BASE_TPL_PATH . "/inc/include.phtml"); ?>
</head>
<body>
<div id="wrapper">
    <?php echo $menuview; ?>
	<div id="page-wrapper">
		<div class="row">
			<div class="col-lg-12">
				<h1 class="page-header">组成员</h1>
			</div>
			<!-- /.col-lg-12 -->
		</div>
		<!-- /.row -->
		<div class="row">
			<div class="col-lg-12">
				<div class="panel panel-default">
					<div class="panel-body">
						<div class="table-responsive">
							<table class="table" id="dataTables-admin">
								<thead>
								<tr>
									<th>用户名</th>
									<th>姓名</th>
									<th>手机</th>
									<th>角色</th>
									<th>所属组</th>
								</tr>
								</thead>
								<tbody>
								<?php foreach ((array)$member as $row) { ?>
									<tr>
										<td><?php echo $row['uname'] ?></td>
										<td><?php echo $row['nick'] ?></td>
                                        <td><?php echo $row['phone']; ?></td>
										<td>
											<?php
											echo $row['isadmin'] ? '管理员' : '普通用户';
											echo $row['isban'] ? '（已禁用）' : '';
											?></td>
                                        <td><?php echo $group['gname']; ?></td>
									</tr>
								<?php } ?>
								</tbody>
							</table>
						</div>
					</div>
					<!-- /.panel -->
				</div>
				<!-- /.col-lg-12 -->
			</div>
			<!-- /.row -->
		</div>
		<!-- /#page-wrapper -->
	</div>
	<!-- /#wrapper -->
</div>
<script type="text/javascript">
$(document).ready(function () {
	$('#dataTables-admin').dataTable({
		"sDom": '<"top">rt<"bottom"p><"clear">',
		"iDisplayLength":20
	});
});
</script>
</body>
</html>
